/*
Date: October 2025
Project: Income and Child Maltreatment: Evidence from a Discontinuity in Tax Benefits
Author: Katherine Rittenhouse
Purpose: This file links birth records to CPS records using pre-existing linkage.
Files in: cw_fkcons_fk_bid; CPS_FCID; Births_fkconsistent_deaths
Files out: Births_fkconsistent_deaths
*/

clear all
set more off

use "cw_fkcons_fk_bid.dta",clear
drop if fkclient==""
merge 1:1 fkclient using "CPS_FCID"

keep if _m==3
drop _m 

collapse (max) anyplage* removed10 removed60 (sum) daysplage*,by(fkconsistent)
merge 1:m fkcons using "Births_fkconsistent_deaths.dta"

drop if _merge==1
drop _merge
save "Births_fkconsistent_deaths.dta",replace
